package com.ynet.middleground.contract.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.ynet.core.common.BaseReqObj;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author daigaole
 * @description 变更合约请求
 * @date 2020-03-22
 */
@Data
@ApiModel(value = "变更合约请求", description = "变更合约请求")
public class ChangeContractReq extends BaseReqObj {

    private static final long serialVersionUID = -1882290573160616469L;

    @ApiModelProperty(value = "业态公司 id \n（仅综合管理平台使用）", notes = "业态公司 id \n（仅综合管理平台使用）", dataType = "Integer")
    private Integer formatId;

    /**
     * 上级合约id
     */
    @ApiModelProperty(value = "上级合约id", notes = "上级合约id", required = true, dataType = "Integer")
    @NotNull(message = "上级合约id不能为空")
    private Integer parentId;

    /**
     * 非制式合约oss地址
     */
    @ApiModelProperty(value = "非制式合约 oss 短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf",
        notes = "非制式合约 oss 短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf", required = true, dataType = "String")
    @NotBlank(message = "非制式合约 oss 短路径地址不能为空")
    private String nonStandardContractOss;

    /**
     * 签署方式：0-线上，1-线下
     */
    @ApiModelProperty(value = "签署方式：0-线上，1-线下", notes = "签署方式", required = true, dataType = "String")
    @NotBlank(message = "签署方式不能为空")
    @Size(max = 1, min = 1, message = "长度为1")
    @Pattern(regexp = "[01]", message = "签署方式：0-线上，1-线下")
    private String signedWay;

    /**
     * 产品类型
     */
    @ApiModelProperty(value = "产品类型，渠道上传渠道的产品类型", notes = "产品类型", dataType = "String")
    private String productType;

    /**
     * 合约名称
     */
    @ApiModelProperty(value = "合约名称", notes = "合约名称", required = true, dataType = "String")
    @NotBlank(message = "合约名称不能为空")
    private String contractName;

    /**
     * 合约类型Code
     */
    @ApiModelProperty(value = "合约类型Code", notes = "合约类型Code", required = true, dataType = "String")
    @NotBlank(message = "合约类型Code不能为空")
    private String contractTypeCode;

    /**
     * 非制式二维码key
     */
    @ApiModelProperty(value = "非制式二维码key OSS 文件为 PDF 时可为空", notes = "非制式二维码key OSS 文件为 PDF 时可为空", dataType = "String")
    // @NotBlank(message = "非制式二维码key不能为空")
    private String codeQrKey;

    /**
     * 非制式合约编号占位符key
     */
    @ApiModelProperty(value = "非制式合约编号占位符key OSS 文件为 PDF 时可为空", notes = "非制式合约编号占位符key OSS 文件为 PDF 时可为空",
        dataType = "String")
    // @NotBlank(message = "非制式合约编号占位符key不能为空")
    private String placeholderKey;

    /**
     * 渠道端业务id
     */
    @ApiModelProperty(value = "渠道端业务id", notes = "渠道端业务id", required = true, dataType = "String")
    @NotBlank(message = "渠道端业务id不能为空")
    private String busId;

    /**
     * 描述备注
     */
    @ApiModelProperty(value = "描述备注", notes = "描述备注", dataType = "String")
    private String description;

    /**
     * 公司编码
     */
    @ApiModelProperty(value = "公司编码", notes = "公司编码", dataType = "String", required = true)
    @NotBlank(message = "公司编码不能为空")
    private String companyCode;

    /**
     * 合约编号
     *
     * @author liulx
     * @date 2020-12-02 15:00:46
     */
    @ApiModelProperty(value = "合约编号\n该字段适用于复杂嵌套合约场景，生成合约中有需要用到其他合约的合约编号参数时，先调用「生成合约编号」服务提前生成合约编号\n一般情况无需使用该字段",
        notes = "合约编号\n该字段适用于复杂嵌套合约场景，生成合约中有需要用到其他合约的合约编号参数时，先调用「生成合约编号」服务提前生成合约编号\n一般情况无需使用该字段", dataType = "String")
    private String contractNo;

}
